package com.lzy.wzy.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class User implements Serializable {

    @NotBlank
    private String userUuid;

    @NotBlank
    private String username;  // 用户名

    @NotBlank
    private String password; //密码

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime; //创建时间

    @NotBlank
    private String name; //姓名

    @NotBlank
    private String department; //部门

    @NotBlank
    private String role;

    private String email;

    private String userStatus;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime timeOnline;

}
